#pragma once
#include <list>
#include <string>
#include <string.h>
//--------------------------------------------------------------------------
// E_FID_IRS_MARKET_DEAL_REQ_V3 = 52045,			//IRS成交摘要信息请求
// E_FID_IRS_MARKET_DEAL_PUSH_V3 = 52046,			//IRS成交摘要信息推送//Req
class xIrsMiddlePriceReq_c
{
public:
	//List
	std::list<UINT> m_List;	//0-Repo 1Y;1-Repo 5Y;2-Shibor 1Y;3-Shibor 5Y
};

struct xIrsMiddlePriceUnit_c
{
public:
	char		m_id[32 + 1];			//UUID,唯一标识成交记录的UUID，用来更新和删除原记录
	char		m_company_id[4];		//经纪公司ID',1,2,3,4

	char		m_goodsCode[16];		//产品方式(Outright, Spread,basis等)
	char		m_typeName[32];			//产品类型(REPO、DEPO等)
	char		m_termName[16];			//期限(1Y,3Y,…)
	char		m_method[16];			//操作类型，UPDATE，

	char		m_price[18];			//价格
	char		m_preClose[18];			//昨收盘，全市场成交收盘
	time_t		m_create_time;			//报价时间

	xIrsMiddlePriceUnit_c()
	{
		memset(this, 0, sizeof(xIrsMiddlePriceUnit_c));
	}

	bool operator == (const xIrsMiddlePriceUnit_c& unit)
	{
		return (strcmp(m_id, unit.m_id) == 0);
	}

	bool operator < (const xIrsMiddlePriceUnit_c& unit)
	{
		return (m_create_time < unit.m_create_time);
	}
};

class xIrsMiddlePriceList_c {
public:
	std::list<xIrsMiddlePriceUnit_c> m_List;	//单个产品的Bid Ofr 中间价
};
